package net.lab1024.sa.base.module.support.rule.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import net.lab1024.sa.base.module.support.rule.domain.entity.RuleCepStep;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 规则步骤 Dao
 */
@Mapper
@Component
public interface RuleCepStepDao extends BaseMapper<RuleCepStep> {
    
    /**
     * 根据规则ID查询所有步骤
     *
     * @param ruleId 规则ID
     * @return List<RuleCepStep>
     */
    List<RuleCepStep> selectByRuleId(@Param("ruleId") Long ruleId);

    /**
     * 根据规则ID删除所有步骤
     *
     * @param ruleId 规则ID
     * @return int
     */
    int deleteByRuleId(@Param("ruleId") Long ruleId);

    /**
     * 批量插入步骤
     *
     * @param steps 步骤列表
     * @return int
     */
    int batchInsert(@Param("list") List<RuleCepStep> steps);
} 